package demo1;

public abstract class Shape {
    public abstract double getArea();
}


interface Drawable {
    void draw();
}


class Circle extends Shape implements Drawable {
    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public double getArea() {
        return Math.PI * radius * radius;
    }

    @Override
    public void draw() {
        System.out.println("绘制一个半径为" + radius + "的圆。");
    }
}


class B {
    public static void main(String[] args) {
        Circle circle = new Circle(5);
        System.out.println("圆的面积是：" + circle.getArea());
        circle.draw();
    }
}
